<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/bootstrap.min.css" rel="stylesheet">
<title>会议记录编写</title>
</head>

<body style="background-color: rgba(187, 179, 179, 0.38);" onload="loadMessageCount()">
<div class="container">
         <jsp:include page="header.jsp"/>
<h1 class="col-sm-12" style="font-family:迷你简菱心;">会议管理系统</h1>
<br><br><br>
<div class="col-sm-2">
			<div data-spy="affix" data-offset-top="160" data-offset-bottom="100">
				<ul class="nav nav-pills nav-stacked">
					<li class="dropdown active"><a class="dropdown-toggle"
						data-toggle="dropdown" href="myMeetingInfo.action"> 我的会议<span class="caret"></span> </a>
						<ul class="dropdown-menu">
							<li><a href="myMeetingInfo.action#future7">未来7天内的会议</a></li>
							<li><a href="myMeetingInfo.action#myOrder">我预约的会议</a></li>
							<li><a href="myMeetingInfo.action#ended">已结束的会议</a></li>
							<li><a href="myMeetingInfo.action#cancel">已取消的会议</a></li>
						</ul>
					</li>

					<li class="dropdown"><a class="dropdown-toggle"
						data-toggle="dropdown" href="#"> 申请会议<span class="caret"></span>
					</a>
						<ul class="dropdown-menu">
							<li><a href="applyByTimeAndNumber.action">通过时间和容量</a>
							</li>
							<li><a href="applyMeetingByAddress.action">通过地点</a>
							</li>
						</ul>
					</li>
					<li><a href="personalInfo.action">
							个人信息</a>
					</li>
					<li><a href="getInvitationInfo.action">
							<span class="badge pull-right" id="mCount"></span>消息</a>
					</li>
				<c:if test="${sessionScope.adminFlag == '1'}">
						<li><a type="button" data-toggle="collapse" data-target="#admin">管理功能</a></li>
						</c:if>
				</ul>
				
				<div id="admin"  class="collapse">
					<ul class="nav nav-pills nav-stacked">
						<li><a href="getPersonAction.action">人员管理</a>
						</li>
						<li><a href="GetMeetingRoomAction.action"><span
								class="badge pull-right"></span>会议室管理</a>
						</li>
						<li><a href="getDeviceAction.action"><span
								class="badge pull-right"></span>设备管理</a>
						</li>
						<li><a href="getDepartmentAction.action"><span
								class="badge pull-right"></span>部门管理</a>
						</li>
						<li><a href="GetMeetingAction.action"><span
								class="badge pull-right"></span>会议管理</a>
						</li>
					</ul>
				</div>
				<!-- 管理界面 -->

			</div>
			<!--  -->
		</div>
  <div class="col-sm-8">
  <ol class="breadcrumb">
  <li><a href="myMeetingInfo.action">主页</a></li>
  <li><a href="myMeetingInfo.action">我的会议</a></li>
  <li class="active">会议记录编写</li>
</ol>

<div class="panel panel-default">
<form action="AddMinStringAction.action" method="post" id="addMinForm">
  <div class="panel-heading">
    <h3 class="panel-title">内容</h3>
  </div>
 <input type="text" name="addTopic" id="addTopic" class="hide" value=<%= request.getAttribute("addTopic") %>>
 <input type="text" name="addDate" id="addDate" class="hide">
 <input type="text" name="diu" id="diu" class="hide">
 <textarea name="content" id="myEditor1" name="myEditor1">这里写你的初始化内容</textarea>
 <div class="panel-footer">     
  <button type="button" class="btn btn-primary" style="margin-left: 600px;" onclick="haha()">确定提交</button>
  </div>
</form>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="ueditor/ueditor.all.js"></script>
    <script type="text/javascript">
    var editor1 = new UE.ui.Editor();
    editor1.render("myEditor1");
    //1.2.4以后可以使用一下代码实例化编辑器
    //UE.getEditor('myEditor')
</script>     
<script src="js/jquery-2.0.1.min.js"></script>
<script src="js/bootstrap.js"></script>
<script type="text/javascript">
	function haha(){
		var myEditor1 = document.getElementById("myEditor1");
		var addTopic = document.getElementById("addTopic");
		var addDate = document.getElementById("addDate");
		var addMinForm = document.getElementById("addMinForm");
		var diu = document.getElementById("diu");
		var mydate = new Date();
		var year = mydate.getFullYear();
		var month = mydate.getMonth()+1;
		var day = mydate.getDate();
		var hour = mydate.getHours();
		var minute = mydate.getMinutes();
		var subTime = year+"-"+month+"-"+day+" "+hour+":"+minute;
		addDate.value = subTime;
		diu.value = myEditor1.value;
		addMinForm.submit();
	}
	
	function loadMessageCount(){
		loadMessageCount_request = false;
		var url="getNewMessage.do";
		if(window.XMLHttpRequest){
			loadMessageCount_request = new XMLHttpRequest();
		}
		else if(window.ActiveXObject){
			try{
				loadMessageCount_request=new ActiveXObject("Msxm12.XMLHTTP");
			}catch (e){
				try{
					loadMessageCount_request=new ActiveXObject("Microsoft.XMLHTTP");
				}catch (e){}
			}
		}
		if(!loadMessageCount_request){
			alert("不能创建X对象");
			return false;
		}
		loadMessageCount_request.onreadystatechange = function(){
			loadMes();
		};
		loadMessageCount_request.open('GET', url, true);
		loadMessageCount_request.send(null);
	}
	
	function loadMes(){
		if(loadMessageCount_request.readyState==4){
			if(loadMessageCount_request.status==200){
				var arr = loadMessageCount_request.responseText;
				var jsonss  =eval("("+arr+")");
				var mCount=document.getElementById("mCount");
				if(jsonss[0]!=0) mCount.innerHTML=jsonss[0];
				}//200
				
				}//4
			
	}//function
	
	function loadMessageCount(){
		loadMessageCount_request = false;
		var url="getNewMessage.do";
		if(window.XMLHttpRequest){
			loadMessageCount_request = new XMLHttpRequest();
		}
		else if(window.ActiveXObject){
			try{
				loadMessageCount_request=new ActiveXObject("Msxm12.XMLHTTP");
			}catch (e){
				try{
					loadMessageCount_request=new ActiveXObject("Microsoft.XMLHTTP");
				}catch (e){}
			}
		}
		if(!loadMessageCount_request){
			alert("不能创建X对象");
			return false;
		}
		loadMessageCount_request.onreadystatechange = function(){
			loadMes();
		};
		loadMessageCount_request.open('GET', url, true);
		loadMessageCount_request.send(null);
	}
	
	function loadMes(){
		if(loadMessageCount_request.readyState==4){
			if(loadMessageCount_request.status==200){
				var arr = loadMessageCount_request.responseText;
				var jsonss  =eval("("+arr+")");
				var mCount=document.getElementById("mCount");
				if(jsonss[0]!=0) mCount.innerHTML=jsonss[0];
				}//200
				
				}//4
			
	}//function
</script>
</html>